Usage
simOutbreak(R0, infec.curve, n.hosts=200, duration=50, seq.length=1e4,
mu.transi=1e-4, mu.transv=mu.transi/2,
rate.import.case=0.01, diverg.import=10, group.freq=1,
spatial=FALSE, disp=0.1, area.size=10, reach=1, plot=spatial)## S3 method for class 'simOutbreak':
print(x, \dots)
## S3 method for class 'simOutbreak':
[(x, i, j, drop=FALSE)
## S3 method for class 'simOutbreak':
labels(object, \dots)
## S3 method for class 'simOutbreak':
as.igraph(x, edge.col="black", col.edge.by="dist",
vertex.col="gold", edge.col.pal=NULL,
annot=c("dist","n.gen"), sep="/", ...)
## S3 method for class 'simOutbreak':
plot(x, y=NULL, edge.col="black",
col.edge.by="dist", vertex.col="gold", edge.col.pal=NULL,
annot=c("dist","n.gen"), sep="/", ...)
disperse(xy, disp=.1, area.size=10)
Arguments
R0
the basic reproduction number; to use several
groups, provide a vector with several values.
infec.curve
a numeric
vector describing the individual
infectiousness at time t=0, 1, ...
n.hosts
the number of susceptible hosts at the begining of the
outbreak
duration
the number of time steps for which simulation is run
seq.length
an integer indicating the length of the simulated
haplotypes, in number of nucleotides.
mu.transi
the rate of transitions, in number of mutation per
site and per time unit.
mu.transv
the rate of transversions, in number of mutation per
site and per time unit.
rate.import.case
the rate at which cases are imported at each
time step.
diverg.import
the number of time steps to the MRCA of all
imported cases.
spatial
a logical indicating if a spatial model should be used.
disp
the magnitude of dispersal (standard deviation of a normal
distribution).
area.size
the size of the square area to be used for spatial simulations.
reach
the mean of the exponential kernel used to determine new infections.
plot
a logical indicating whether an animated plot of the
outbreak should be displayed; only available with the spatial model.
group.freq
the frequency of the different groups; to use
several groups, provide a vector with several values.
x,object
simOutbreak
objects.
i,j, drop
i
is a vector used for subsetting the
object. For instance, i=1:3
will retain only the first three
haplotypes of the outbreak. j
and drop
are only
provided for compatibility, but not used.
y
present for compatibility with the generic 'plot'
method. Currently not used.
col
the color of the vertices of the plotted graph.
edge.col
the color of the edges of the plotted graph;
overridden by col.edge.by
.
col.edge.by
a character indicating the type of information to
be used to color the edges; currently, the only valid value is "dist"
(distances, in number of mutations). Other values are ignored.
vertex.col
the colors to be used for the vertices (i.e.,
cases).
edge.col.pal
the color palette to be used for the edges; if
NULL, a grey scale is used, with darker shades representing larger
values.
annot
a character indicating the information to be used to
annotate the edges; currently accepted values are "dist" (genetic
distances, in number of mutations), and "n.gen" (number of generations
between cases).
sep
a character used to separate fields used to annotate the
edges, whenever more than one type of information is used for
annotation.
xy
spatial coordinates used as input for the dispersal process.
...
further arguments to be passed to other methods